package com.ssy.lingxi.order.model.vo.buyer.request;

import com.ssy.lingxi.order.handler.annotation.DeliverPeriodAnnotation;
import com.ssy.lingxi.order.handler.annotation.ManageShopEnvironmentAnnotation;
import com.ssy.lingxi.order.handler.annotation.PointsOrderShopTypeAnnotation;
import com.ssy.lingxi.order.model.vo.basic.request.OrderConsigneeVO;
import com.ssy.lingxi.order.model.vo.basic.request.OrderInvoiceVO;
import com.ssy.lingxi.order.model.vo.basic.request.PointsOrderProductVO;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Positive;
import javax.validation.constraints.Size;
import java.io.Serializable;

/**
 * 创建积分订单接口参数VO
 * @author 万宁
 * @version 2.0.0
 * @date 2021-10-09
 */
public class BuyerPointsOrderVO implements Serializable {
    private static final long serialVersionUID = -5792628696318098343L;

    /**
     * 供应商会员Id
     */
    @NotNull(message = "供应商会员Id要大于0")
    @Positive(message = "供应商会员Id要大于0")
    private Long vendorMemberId;

    /**
     * 供应商会员角色Id
     */

    @NotNull(message = "供应商会员角色Id要大于0")
    @Positive(message = "供应商会员角色Id要大于0")
    private Long vendorRoleId;

    /**
     * 供应商会员名称
     */
    @NotBlank(message = "供应商会员名称不能为空")
    @Size(max = 200, message = "供应商会员名称最长200个字符")
    private String vendorMemberName;

    /**
     * 订单来源商城Id
     */
    @NotNull(message = "订单来源商城Id不能为空")
    private Long shopId;

    /**
     * 商城类型，2-积分商城，5-渠道积分商城
     */
    @NotNull(message = "商城类型不能为空")
    @PointsOrderShopTypeAnnotation
    private Integer shopType;

    /**
     * 商城环境
     */
    @NotNull
    @ManageShopEnvironmentAnnotation
    private Integer shopEnvironment;

    /**
     * 订单来源商城名称
     */
    @NotBlank(message = "订单来源商城名称不能为空")
    @Size(max = 50, message = "订单来源商城名称最长50个字符")
    private String shopName;

    /**
     * 交付日期，格式为yyyy-MM-dd，或yyyy-MM-dd HH:mm，或yyyy-MM-dd HH:mm-HH:mm
     */
    @DeliverPeriodAnnotation
    private String deliverDate;

    /**
     * 收货地址，如商品配送方式中包含“物流”，则必须填写
     */
    @Valid
    private OrderConsigneeVO consignee;

    /**
     * 是否有发票，true-有，false-无
     */
    @NotNull(message = "'是否有发票'字段不能为空")
    private Boolean hasInvoice;

    /**
     * 发票信息，如订单没有发票不需要填写此字段
     */
    @Valid
    private OrderInvoiceVO invoice;

    /**
     * 积分商品信息
     */
    @NotNull(message = "积分商品不能为空")
    @Valid
    private PointsOrderProductVO product;

    public Long getVendorMemberId() {
        return vendorMemberId;
    }

    public void setVendorMemberId(Long vendorMemberId) {
        this.vendorMemberId = vendorMemberId;
    }

    public Long getVendorRoleId() {
        return vendorRoleId;
    }

    public void setVendorRoleId(Long vendorRoleId) {
        this.vendorRoleId = vendorRoleId;
    }

    public String getVendorMemberName() {
        return vendorMemberName;
    }

    public void setVendorMemberName(String vendorMemberName) {
        this.vendorMemberName = vendorMemberName;
    }

    public Long getShopId() {
        return shopId;
    }

    public void setShopId(Long shopId) {
        this.shopId = shopId;
    }

    public Integer getShopType() {
        return shopType;
    }

    public void setShopType(Integer shopType) {
        this.shopType = shopType;
    }

    public Integer getShopEnvironment() {
        return shopEnvironment;
    }

    public void setShopEnvironment(Integer shopEnvironment) {
        this.shopEnvironment = shopEnvironment;
    }

    public String getShopName() {
        return shopName;
    }

    public void setShopName(String shopName) {
        this.shopName = shopName;
    }

    public String getDeliverDate() {
        return deliverDate;
    }

    public void setDeliverDate(String deliverDate) {
        this.deliverDate = deliverDate;
    }

    public OrderConsigneeVO getConsignee() {
        return consignee;
    }

    public void setConsignee(OrderConsigneeVO consignee) {
        this.consignee = consignee;
    }

    public Boolean getHasInvoice() {
        return hasInvoice;
    }

    public void setHasInvoice(Boolean hasInvoice) {
        this.hasInvoice = hasInvoice;
    }

    public OrderInvoiceVO getInvoice() {
        return invoice;
    }

    public void setInvoice(OrderInvoiceVO invoice) {
        this.invoice = invoice;
    }

    public PointsOrderProductVO getProduct() {
        return product;
    }

    public void setProduct(PointsOrderProductVO product) {
        this.product = product;
    }
}
